package wyx.practice.springboot.dubbo.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import wyx.practice.springboot.dubbo.DemoService;

/**
 * 神兽护佑,bug退散
 *
 * @author wuyuxiao created on 2018-3-8
 */
@RestController
public class HelloController {

    @Reference
    private DemoService demoService;

    @RequestMapping("/hello/{name}")
    public String hello(@PathVariable String name){
        return demoService.sayHello(name);
    }
}
